const isCloseBtn: boolean = false;

const setIsCloseBtnReducer = (preState: boolean = isCloseBtn, action: any) => {
  const { type, data } = action;

  switch (type) {
    case 'BTN_CLOSE':
      return (preState = data);
    case 'BTN_OPEN':
      return (preState = data);
    default:
      return preState;
  }
};

export default setIsCloseBtnReducer;
